package edu.sctu.zcy.month201505.day20150526.homeworkchen_v2;

/**
 * Created by user24 on 2015/5/29.
 */
public class Student {

    public String name;
    public int age;
    public String department;

    public int selectWindow;
    public int selectQueue;
    public String[] seleceDish = new String[2];

    public Student(String name,int age,String department) {

        System.out.println("学生姓名："+name);
        System.out.println("学生年龄："+age);
        System.out.println("学生系别："+department);
    }

    DiningRoom diningRoom = new DiningRoom();
    public void getWindowAndQueueAndDish(){

//        System.out.println("学生选择的窗口编号："+ diningRoom.windows[1].windowNumber);
//        System.out.println("学生选择的窗口前的人数："+ diningRoom.windows[1].queuePeopleNumber);
//        System.out.println("学生选择的食物："+ diningRoom.windows[1].foods[2].name+
//                "   "+diningRoom.windows[1].foods[1].name);

        selectWindow = diningRoom.windows[1].windowNumber;
        selectQueue = diningRoom.windows[1].queuePeopleNumber;
        seleceDish[0] =  diningRoom.windows[1].foods[2].name;
        seleceDish[1] = diningRoom.windows[1].foods[1].name;
        System.out.println("学生所选窗口编号："+selectWindow);
        System.out.println("学生所选窗口前的人数："+selectQueue);
        System.out.println("学生所选食物："+seleceDish[0]+"  "+seleceDish[1]);

    }

    public void haveTheFood(){

        getWindowAndQueueAndDish();
        if(diningRoom.getSeat()  == 0){

            System.out.println("该座位上无人，可以坐");
        }
        System.out.println("开始吃饭！");


    }

}
